import { request } from "@/request/request";

export const getMyRentHouses = () =>
  request({
    url: "/user/houses",
  });

export const getCommunity = (params) =>
  request({
    url: "/area/community",
    params,
  });

export const getRentParams = () =>
  request({
    url: "/houses/Params",
  });

// 房屋图片
export const postRentHouseImg = (fm) => {
  return request({
    url: "/houses/image",
    method: "POST",
    headers: {
      "Content-Type": "multipart/form-data",
    },
    data: fm,
  });
};

export const postRentHouse = (data) =>
  request({
    url: "/user/houses",
    method: "POST",
    data,
  });
